#pragma once

#include <deque>
#include <string>

#include <boost\shared_ptr.hpp>

#include "Command.h"

class Executor
{
public:

    typedef boost::shared_ptr<Command> CommandPtr;

    bool Do( const Command& cmd );
    bool Undo();
    bool Redo();

    bool CanUndo();
    bool CanRedo();

    std::wstring GetUndoName();
    std::wstring GetRedoName();

protected:

    void LimitUndo();

    static const int undoDepth = 20;

    std::deque<CommandPtr> undo;
    std::deque<CommandPtr> redo;
};
